﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;

namespace BMS.Utilities
{
    public static class Configuration
    {
        // Database Connection Setting
        public static String DatabaseServer = WebConfigurationManager.AppSettings["DatabaseServer"];
        public static String DatabaseName = WebConfigurationManager.AppSettings["DatabaseName"];
        public static String DatabaseUserName = WebConfigurationManager.AppSettings["DatabaseUserName"];
        public static String DatabasePassword = WebConfigurationManager.AppSettings["DatabasePassword"];
        
        // Output Info (i.e. Templates, Destination Path, No of Records, File Format, etc)
        public static String QuotationTemplatePath = WebConfigurationManager.AppSettings["QuotationTemplatePath"];
        public static String AttachmentTableTemplatePathForDN = WebConfigurationManager.AppSettings["AttachmentTableTemplatePathForDN"];
        public static String InvoiceTemplatePathForDN = WebConfigurationManager.AppSettings["InvoiceTemplatePathForDN"];
        public static String InvoiceTemplatePathForWOOrPO = WebConfigurationManager.AppSettings["InvoiceTemplatePathForWOOrPO"];
        public static String InvoiceTemplatePathForQuo = WebConfigurationManager.AppSettings["InvoiceTemplatePathForQuo"];
        public static String QuotationDestinationPath = WebConfigurationManager.AppSettings["QuotationDestinationPath"];
        public static String InvoiceDestinationPath = WebConfigurationManager.AppSettings["InvoiceDestinationPath"];
        public static String Underscore = WebConfigurationManager.AppSettings["Underscore"];
        public static String Hyphen = WebConfigurationManager.AppSettings["Hyphen"];
        public static String Space = WebConfigurationManager.AppSettings["Space"];
        public static String ReferInShortForm = WebConfigurationManager.AppSettings["ReferInShortForm"];
        public static String WorkCompletionDateWord = WebConfigurationManager.AppSettings["WorkCompletionDateWord"];
        public static String AttachmentInShortForm = WebConfigurationManager.AppSettings["AttachmentInShortForm"];
        public static String WordFileFormat = WebConfigurationManager.AppSettings["WordFileFormat"];
        public static String PDFFileFormat = WebConfigurationManager.AppSettings["PDFFileFormat"];
        public static String ExcelSrcPathForAllCompanies = WebConfigurationManager.AppSettings["ExcelSrcPathForAllCompanies"];
        public static String ExcelInvSrcPathForAllCompanies = WebConfigurationManager.AppSettings["ExcelInvSrcPathForAllCompanies"];
        public static String ExcelAndPDFDestPath = WebConfigurationManager.AppSettings["ExcelAndPDFDestPath"];
        public static String CompanyLogoPath = WebConfigurationManager.AppSettings["CompanyLogoPath"];
        public static int MaxNoOfRecords = int.Parse(WebConfigurationManager.AppSettings["MaxNoOfRecords"]);
        public static int MaxNoOfItemsForInvoice = int.Parse(WebConfigurationManager.AppSettings["MaxNoOfItemsForInvoice"]);
        public static int NoOfRowsForQuotation = int.Parse(WebConfigurationManager.AppSettings["NoOfRowsForQuotation"]);

        // Company Info
        public static String CompanyNameInEnglish = WebConfigurationManager.AppSettings["CompanyNameInEnglish"];
        public static String CompanyNameInChinese = WebConfigurationManager.AppSettings["CompanyNameInChinese"];
        public static String CompanyAddressInEnglish = WebConfigurationManager.AppSettings["CompanyAddressInEnglish"];
        public static String CompanyAddressInChinese = WebConfigurationManager.AppSettings["CompanyAddressInChinese"];
        public static String CompanyExtraInfo = WebConfigurationManager.AppSettings["CompanyExtraInfo"];
        public static String CompanySignaturePath = WebConfigurationManager.AppSettings["CompanySignaturePath"];
        public static String VendorNo = WebConfigurationManager.AppSettings["VendorNo"];

        // Font Files
        public static String CompanyFontForEng = WebConfigurationManager.AppSettings["FontPath"] + WebConfigurationManager.AppSettings["CompanyFontFileForEng"];
        public static String CompanyFontForChi = WebConfigurationManager.AppSettings["FontPath"] + WebConfigurationManager.AppSettings["CompanyFontFileForChi"];

        // Currrency
        public static List<String> CurrencyList = WebConfigurationManager.AppSettings["AmtCurrency"].Split(',').ToList();

        // Report Type
        public static List<String> ReportTypeList = WebConfigurationManager.AppSettings["ReportType"].Split(',').ToList();
        public static String InvoiceReportName = WebConfigurationManager.AppSettings["InvoiceReportName"];
        public static String QuotationReportName = WebConfigurationManager.AppSettings["QuotationReportName"];
        public static String WorkOrderReportName = WebConfigurationManager.AppSettings["WorkOrderReportName"];
        public static String ReportOutputPath = WebConfigurationManager.AppSettings["ReportOutputPath"];
        public static String InvoiceReportFileName = WebConfigurationManager.AppSettings["InvoiceReportFileName"];
        public static String ReportPath = WebConfigurationManager.AppSettings["ReportPath"];

        // Invoice Type
        public static List<String> TargetToList = WebConfigurationManager.AppSettings["InvoiceType"].Split(',').ToList();

        // Emergency Type
        public static List<String> EmergencyTypeList = WebConfigurationManager.AppSettings["EmergencyType"].Split(',').ToList();

        // City Type
        public static List<String> CityTypeList = WebConfigurationManager.AppSettings["CityType"].Split(',').ToList();

        // Extrenal File Path
        public static String PDFConverterPath = WebConfigurationManager.AppSettings["PDFConverterPath"];
        public static String CommandPromptExeFile = WebConfigurationManager.AppSettings["CommandPromptExeFile"];
    }
}